<template>
    <div class="container">
        <van-button type="primary">haha</van-button>
        vant-picker
        <van-picker title="选择日期" :columns="columns"  @confirm="onConfirm" />
    </div>
</template>

<script setup>
import { ref } from 'vue';

const columns = [
    { text: '周一', value: '1' ,children:[
        {
            text:'上午',
            value:'am'
        },
        {
            text:'下午',
            value:'pm'
        },
        {
            text:'晚上',
            value:'night'
        }
    ]},
    { text: '周二', value: '2' },
    { text: '周三', value: '3' },
    { text: '周四', value: '4' },
    { text: '周五', value: '5' },
    { text: '周六', value: '6' },
    { text: '周日', value: '7' },
];
const selectedValue = ref('1');
const onConfirm = (value) => {
    console.log('选中值:', value);
};
</script>

<style scoped>
.container {
    height: 500px;
    width: 500px;
}
</style>